<template>
  <div class="contain-edit">
    <div class="header">
      <p>查看详情</p>
      <el-button class="link" type="primary">
        <router-link to="/landlordList" style="color: #fff;">返回</router-link>
      </el-button>
    </div>
    <div class="main">
      <div class="list">
        <div class="title">房东详情</div>
        <div class="item">
          <div class="item-key">房东:</div>
          <div class="item-value">{{ info && info.name ? info.name : ''}}</div>
        </div>
        <div class="item">
          <div class="item-key">性别:</div>
          <div  class="item-value" v-if="info.sex == 'male'">男性</div>
          <div class="item-value" v-else-if="info.sex == 'female'">女性</div>
          <div class="item-value" v-else>中性</div>
        </div>
        <div class="item">
          <div class="item-key">联系电话:</div>
          <div  class="item-value" >{{ info && info.mobile ? info.mobile : ''}}</div>
        </div>
        <div class="item">
          <div class="item-key">身份证号:</div>
          <div  class="item-value" >{{ info && info.idCardNo ? info.idCardNo : ''}}</div>
        </div>
        <div class="item" style="min-height: 150px">
          <div class="item-key" style="height: 150px;line-height: 150px;">身份证正面:</div>
          <div  class="item-value" style="height: 150px;line-height: 150px; margin-top: 15px;">
            <img :src="info && info.idcard1 ? info.idcard1: ''" alt="" style="width: 120px;height: 120px;margin-right: 15px;">
          </div>
        </div>
      </div>
    </div>
  </div>
  </div>
</template>

<script>
  let CONSTANT = require('../../constant/constant.js');
  let common = require("../../common.js");

  export default {
    data() {
      return {
        id:'',
        info: {
          name: "",
          mobile: "",
          sexText: "",
          idCardNo: "",
          idcard1: ""
        }
      }
    },
    mounted() {
      this.id  = this.$router.currentRoute.query.id;
      this.getDetail(this.id);
    },
    methods: {

      getDetail(id){
        let url = CONSTANT.URL.LANDLORD.DETAIL;
        let param = {
          id:id
        };
        common.requestAjax(url,{},param,(res)=>{
          this.loading = false;
          this.info = res.data.bussData;
        })
      },
      trantdata(data){
        var date = new Date(data);
        var mon = date.getMonth() + 1;
        var day = date.getDate();
        var hours = date.getHours();
        var minutes = date.getMinutes();
        var nowDay = mon + "月" +(day<10?"0"+day:day)+"日" + (hours<10?"0"+hours:hours)+":" +(minutes<10?"0"+minutes:minutes);
        return nowDay;
      },

    },
  }
</script>
<style lang="scss" scoped>
  .item-left {
    float: left;
    width: 120px;
    padding-left: 20px;
    padding-right: 10px;
    // height: 40px;
    line-height: 40px;
    text-align: right;
    border-right: 1px solid #dedede;
  }
  .item-right {
    // height: 40px;
    // line-height: 40px;
    padding-left: 20px;
    float: left;
  }
  .backage {
    height: auto;
    border: 1px solid #dedede;
    border-top: none;
  }
  .analyse{
    margin-left: 151px;
    height:530px;
    padding-top: 20px;
    display: flex;
  }
  .pic{
    width:330px;
    height:530px;
    // background-color:yellowgreen;
    display: inline-block;
    margin-right: 30px;
    padding-left: 20px;
    .avatar-info{
      .avatar{
        width:100px;
        height:100px;
        background-color:#626262;
        margin-top:50px;
        border-radius:50%;
        float:left;
        .avatar-img{
          width: 100%;
          height: 100%;
        }
      }
      .info{
        // float:left;
        // margin-top:50px;
        margin-left:10px;
        padding: 60px 20px;
      }
    }
  }
  .pic-font{
    border-left: 5px solid #999;
    width: 100px;
    height: 40px;
    line-height: 40px;
    // background-color: pink;
    // margin-left: 15px;
    margin-bottom: 15px;
    display: block;
  }
  .wins{
    display: inline-block;
    height: 350px;
    flex: 1;
  }
  .match{
    list-style:none;
    padding-left:20px;
    margin-top:20px;
    .match-item{
      width: 300px;
      height:50px;
      background-color: #eee;
      margin-bottom:30px;
    }
  }
  #chart{
    width:300px;
    height:300px;
  }
  .honor {
    float: left;
    width: 150px;
    height: 150px;
    margin-right: 20px;
    // background-color: yellow;
    .honor-img{
      width: 70px;
      height: 70px;
      padding: 30px 40px 0px 40px;
    }
    .honor-span{
      width: 40px;
      height: 20px;
      border: 1px solid #ccc;
      display: block;
      margin-left: 55px;
    }
    .honor-text{
      display: block;
      text-align: center;
      font-size: 14px;
    }
  }

</style>


